From: Julien Grall Date: Thu, 15 Sep 2016 11:28:25 +0000 (+0100) Subject: xen/arm: p2m: Change the type of level_shifts from paddr_t to uint8_t X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~333 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=e3b0d2eca33d3acfaf4b86905ed6d4853dce6722;p=xen.git xen/arm: p2m: Change the type of level_shifts from paddr_t to uint8_t The level shift can be encoded with 8-bit. So it is not necessary to use paddr_t (i.e 64-bit). Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini Tested-by: Tamas K Lengyel --- diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 31e2004bbc..587ce5b241 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -687,14 +687,14 @@ static const paddr_t level_sizes[] = { ZEROETH_SIZE, FIRST_SIZE, SECOND_SIZE, THIRD_SIZE }; static const paddr_t level_masks[] = { ZEROETH_MASK, FIRST_MASK, SECOND_MASK, THIRD_MASK }; -static const paddr_t level_shifts[] = +static const uint8_t level_shifts[] = { ZEROETH_SHIFT, FIRST_SHIFT, SECOND_SHIFT, THIRD_SHIFT }; static int p2m_shatter_page(struct p2m_domain *p2m, lpae_t *entry, unsigned int level) { - const paddr_t level_shift = level_shifts[level]; + const uint8_t level_shift = level_shifts[level]; int rc = p2m_create_table(p2m, entry, level_shift - PAGE_SHIFT); if ( !rc )